package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 以梦为马，以汗为泉，不忘初心，不负韶华
 *
 * @author
 * @version 1.0
 * @data 2025/2/7 21:01
 */

@Controller
public class Demo1reqandrespController {
    @GetMapping("/test1")
    public String test1(){
        System.out.println("test1");
        return "ok.html";
    }
    @PostMapping("/test2")
    public String test2(){
        System.out.println("test2");
        return "ok.html";
    }
    //@RequestMapping默认是Get请求
    @RequestMapping("/test3")
    public String test3(){
        System.out.println("test3");
        return "ok.html";
    }
    @RequestMapping(value = "/test4",method = RequestMethod.POST)
    public String test4(){
        System.out.println("test4");
        return "ok.html";
    }

}
